<nz-spin [nzSpinning]="isSpinning">
    <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm($event,validateForm.value)">
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
                <label for="title" nz-form-item-required>标题</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback [nzValidateStatus]="getFormControl('title')">
                <nz-input name="title" formControlName="title" [nzSize]="'large'" [(ngModel)]="noticeBean.title" ></nz-input>
                <div nz-form-explain *ngIf="getFormControl('title').dirty&&getFormControl('title').hasError('required')">标题不能为空!</div>
            </div>

            <div nz-form-label nz-col [nzSm]="3" >
                <label for="content" nz-form-item-required>内容</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback [nzValidateStatus]="getFormControl('content')">
                <nz-input name="content" [nzId]="'content'" formControlName="content" [nzSize]="'large'" [(ngModel)]="noticeBean.content" name="content"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('content').dirty&&getFormControl('content').hasError('required')">年龄不能为空!</div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="3" >
                <label for="sendUserId" nz-form-item-required>通知者</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback [nzValidateStatus]="getFormControl('sendUserId')">
                <nz-input [nzSize]="'large'" formControlName="sendUserId" [nzId]="'sendUserId'" [(ngModel)]="noticeBean.sendUserId" name="sendUserId"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('sendUserId').dirty&&getFormControl('sendUserId').hasError('required')">账号名不能为空!</div>
            </div>
            <div nz-form-label nz-col [nzSm]="3" >
                <label for="receiveUserId" nz-form-item-required>被通知者</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback [nzValidateStatus]="getFormControl('receiveUserId')">
                <nz-input name="receiveUserId" [nzId]="'receiveUserId'" formControlName="receiveUserId" [nzSize]="'large'" [(ngModel)]="noticeBean.receiveUserId" name="receiveUserId"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('receiveUserId').dirty&&getFormControl('receiveUserId').hasError('required')">密码不能为空!</div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
                <label for="anType">通知书类型</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback >
                <nz-input name="anType" formControlName="anType" [nzSize]="'large'" [(ngModel)]="noticeBean.anType" ></nz-input>
            </div>
            <div nz-form-label nz-col [nzSm]="3" >
                <label for="isRead">是否已读</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback >
                <nz-input name="isRead" [nzId]="'isRead'" formControlName="isRead" [nzSize]="'large'" [(ngModel)]="noticeBean.isRead" name="isRead"></nz-input>
            </div>
        </div>
       
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSm]="3" >
                <label for="fileUrls">附件</label>
            </div>
            <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback >
                <input type="file" ng2FileSelect [uploader]="fileUploader" (change)="selectedFileOnChanged($event)"/>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div *ngIf="showImage!=null" style="margin-left: 50px">
                <div>
                    <img (click)="delete(f)" *ngFor="let f of showImage" src="{{config.IP+config.API.getUpload+f}}" width="40px" height="40px" style="margin-left: 10px;"/>
                </div>
            </div>
        </div>

        <div nz-form-item nz-row style="margin-bottom:8px;">
            <div nz-form-control nz-col [nzSpan]="14" [nzOffset]="10">
                <button nz-button [nzSize]="'large'" [nzType]="'primary'">添加</button>
            </div>
        </div>
    </form>
</nz-spin>